package com.ws.ssmzongjie3.mapper;

import com.ws.ssmzongjie3.bean.Acl_Permission;
import com.ws.ssmzongjie3.bean.Acl_User;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface Acl_UserMapper {
    @Select("select * from acl_user where username=#{username}")
    public Acl_User getUserByName(Acl_User user);
    @Select("select * from acl_user where acl_user_id=#{acl_user_id}")
    public Acl_User getUserById(Acl_User user);
    @Insert("insert into acl_user(username,password,nickname,is_deleted,acl_user_avatar,create_time,update_time,sid) values(#{username},#{password},#{nickname},#{is_deleted},#{acl_user_avatar},now(),now(),#{sid})")
    public int insertUser(Acl_User user);
    @Delete("delete from acl_user where acl_user_id=#{acl_user_id}")
    public int deleteById(Acl_User user);
    @Select("select * from acl_user where username=#{username} and password=#{password}")
    public Acl_User getlogin(Acl_User user);
    public List<Acl_User> listUser(Acl_User user);
    public int updateUser(Acl_User user);
    public List<Acl_User> listUserWithMerchant(Acl_User user);
    public List<Acl_Permission> listPermissionsByUserId(Acl_User user);
}
